import { start } from "nprogress"

const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  token: state => state.user.token,
  avatar: state => state.user.avatar,
  name: state => state.user.name, // 获取用户名
  invite_code: state => state.user.invite_code, // 邀请码
  accountStatus: state => state.user.accountStatus, // 用户账号信息
  // 从user的获取数据，从而拿到用户资产相关的信息
  accountInfo: state => state.user.accountInfo, // 用户账户信息（资产相关）
  // 可以通过productList拿到投资产品的列表
  productList: state => state.invest.productList, // 投资产品的列表
  // 获取银行卡列表
  bankCardList: state => state.card.bankCardList,
  // 权限组
  roles: state => state.user.roles,
  // 权限
  permission_routes: start => start.permission.routes
}
export default getters
